package com.seqb.common.dialect;

import org.thymeleaf.dialect.AbstractProcessorDialect;
import org.thymeleaf.processor.IProcessor;
import org.thymeleaf.standard.StandardDialect;

import java.util.HashSet;
import java.util.Set;

/**
 * @author lilinshen
 * @title 请填写标题
 * @description 请填写相关描述
 * @date 2019/11/15
 */
public class SeqbDialect extends AbstractProcessorDialect {

    private static final String PREFIX = "seqb";

    public SeqbDialect() {
        super("Seqb Dialect", PREFIX, StandardDialect.PROCESSOR_PRECEDENCE);
    }

    @Override
    public Set<IProcessor> getProcessors(String dialectPrefix) {
        final Set<IProcessor> processors = new HashSet<IProcessor>();
        processors.add(new UploadImageProcessor(dialectPrefix, "upload-image"));
        processors.add(new UploadImagesProcessor(dialectPrefix, "upload-images"));
        processors.add(new UploadFileProcessor(dialectPrefix, "upload-file"));
        processors.add(new UploadFilesProcessor(dialectPrefix, "upload-files"));
        return processors;
    }
}
